{% extends 'layout.html' %}
{% block maincontent%}
    <h2> 添加诗人</h2>
    <form action="" method="post">
        <!-- django中防止csrf攻击的方式 -->
        {% csrf_token %}

        <div class="form-group">
            <input class='form-control' type="text" name="name" placeholder="请输入姓名">
        </div>
        <div class='form-group'>
            <select name="sex">
                {%for s in sex_options %}
                    <option value="{{s.0}}"> {{s.1}} </option>
                {%endfor%}
            </select>
        </div>
        <div class='form-group'>
            <select name="dynasty">
                {%for s in dynasty_options %}
                    <option value="{{s.0}}"> {{s.1}} </option>
                {%endfor%}
            </select>
        </div>
        <div class='form-group'>
            <input class='btn btn-primary' type="submit" value='添加诗人'>
        </div>
    </form>
{% endblock %}